Portable Document Format (namespace Pdf)


DictionaryItem
DictionaryItem()
void Delete()
~ DictionaryItem()

Document
Document()
bool GetPdf(const wchar_t* filename, string& out_pdf)
bool Save(const wchar_t* filename)
void AddPage(int paperSize, bool isPortrait)
paperSize: PDF_PAPER_SIZE_LETTER, PDF_PAPER_SIZE_LEGAL, PDF_PAPER_SIZE_HALF_LETTER, PDF_PAPER_SIZE_JUNIOR_LEGAL, PDF_PAPER_SIZE_LEDGER
void CutToFitWidth(const wchar_t* text, int font, double fontSize, double width, wstring& out_text)
It returns the part of the text that fits in the specified width
void Paragraph(const wchar_t* text, int font, double fontSize, double paragraphWidth, vector<vector<Pdf::TextGroup>>& out_textGroup)
It separates the input text into a vector of vectors with the individual words font: PDF_FONT_ARIAL, PDF_FONT_COURIER_NEW, PDF_FONT_TIMES_NEW_ROMAN, PDF_FONT_SYMBOL
~ Document()

Font
Font()
bool IsBold()
bool IsItalics()
const char* GetBaseFont()
const wchar_t* GetFontName()
double GetAscent(double fontSize)
double GetAveCharWidth(double fontSize)
double GetCapEmHeight(double fontSize)
double GetCharWidth(wchar_t character, double fontSize)
double GetDescent(double fontSize)
double GetHeight(double fontSize)
double GetItalicAngle(double fontSize)
double GetLeading(double fontSize)
double GetMaxCharWidth(double fontSize)
double GetTextWidth(const wchar_t* text, double fontSize)
double GetTextWidth(const wstring& text, double fontSize)
double GetXHeight(double fontSize)
int GetPdfFont()
int GetWidth(int index)
static const wchar_t* PdfFontName(int pdfFont)
static int GetPdfFontType(const wchar_t* fontname, bool isBold, bool isItalics)
Given a fontname it returns one of: PDF_FONT_ARIAL, PDF_FONT_COURIER_NEW, PDF_FONT_TIMES_NEW_ROMAN,PDF_FONT_SYMBOL
void ClearPdfObject()
void Create(HWND hWnd, int fontType)
void Create(int fontType)
pdfFont: PDF_FONT_ARIAL, PDF_FONT_COURIER_NEW, PDF_FONT_TIMES_NEW_ROMAN, PDF_FONT_SYMBOL
void GetFontBox(Sys::Rectangle& out_rect, double fontSize)
~ Font()

Image
Image()
void Delete()
~ Image()

LexicalAnalyzer: A lexical analyzer for PDF
LexicalAnalyzer(void)
bool Create(const wchar_t* filename)
To Run: 1. Call Create 2. Call GetNextToken repeatealy until the token.type be LEX_END_OF_FILE
void Delete()
void GetNextToken(Pdf::Token& token)
To Run: 1. Call Create 2. Call GetNextToken repeatealy until the token.type be LEX_END_OF_FILE
void Peek1Token(Pdf::Token& token)
It returns the token that will be returned in the next call to GetNextToken
void Peek2Token(Pdf::Token& token)
It returns the token that will be returned in the second call to GetNextToken
~ LexicalAnalyzer(void)

Page: You may use the class Sys::Base85Encoder to encode streams
Page()
bool IsPortraitOrientation()
double GetHeight()
double GetMillimetersHeight()
double GetMillimetersWidth()
double GetWidth()
int GetPaperSize()
It returns: PDF_PAPER_SIZE_LETTER, PDF_PAPER_SIZE_LEGAL, PDF_PAPER_SIZE_HALF_LETTER, PDF_PAPER_SIZE_JUNIOR_LEGAL, PDF_PAPER_SIZE_LEDGER
void AddImage(Pdf::Image& in_out)
void Arc(double centerX, double centerY, double radius, double startAngleDegrees, double endAngleDegrees)
It draws a circular arc
void BeginText()
void Chord(double centerX, double centerY, double radius, double startAngleDegrees, double endAngleDegrees)
It draws a circular chord
void Circle(double centerX, double centerY, double radius)
void CloseAndStrokePath()
You must call StrokePath() after one or more calls to: LineTo, Line, Rectangle, ...
void CloseEvenOddFillAndStrokePath()
You must call StrokePath() after one or more calls to: LineTo, Line, Rectangle, ...
void CloseFillAndStrokePath()
You must call StrokePath() after one or more calls to: LineTo, Line, Rectangle, ...
void ClosePath()
Close the current subpath by appending a straight line segment from the current point to the starting point of the subpath. If the current subpath is already closed, h shall do nothing. This operator terminates the current subpath. Appending another segment to the current path shall begin a new subpath, even if the new segment begins at the endpoint reached by the h operation
void Concat(double a, double b, double c, double d, double e, double f)
cm: Modify the current transformation matrix (CTM) by concatenating the specified matrix | a b 0 | Translation: a=1 b=0 c=0 d=1 e=translationX f=translationY | c d 0 | Scaling: a=scaleX b=0 c=0 d=scaleY e=0 f=0 | e f 0 | Rotation: a=cos(angle) b=sin(angle) c=-sin(angle) d=cos(angle) e=0 f=0
void ConcatRotation(double angleDegrees, double e, double f)
cm: Modify the current transformation matrix (CTM) by concatenating the specified matrix | a b 0 | Rotation: a=cos(angle) b=sin(angle) c=-sin(angle) d=cos(angle) e=0 f=0 | c d 0 | | e f 0 |
void CurveTo(double x1, double y1, double x2, double y2, double x3, double y3)
c: Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bezier control points
void CurveTo(double x2, double y2, double x3, double y3)
v: Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the control points. The new current point will be (x3, y3);
void CurveToX(double x1, double y1, double x3, double y3)
y: Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the control points. The new current point will be (x3, y3);
void DrawImage(Pdf::Image image, double x, double y, double scaleX, double scaleY)
void Ellipse(double xLeft, double yTop, double xRight, double yBottom)
void EndPathWithoutFillOrStroke()
void EndText()
void EvenOddFillAndStrokePath()
You must call StrokePath() after one or more calls to: LineTo, Line, Rectangle, ...
void FillAndStrokePath()
You must call StrokePath() after one or more calls to: LineTo, Line, Rectangle, ...
void FillColor(COLORREF color)
rg: RGB color for fill operations
void FillPath()
You must call StrokePath() after one or more calls to: LineTo, Line, Rectangle, ...
void Font(int pdfFont, double fontSize)
pdfFont: PDF_FONT_ARIAL, PDF_FONT_COURIER_NEW, PDF_FONT_TIMES_NEW_ROMAN, PDF_FONT_SYMBOL
void Line(double x1, double y1, double x2, double y2)
void LineCapStyle(int capStyle)
J: Specify the shape to be used at the ends of open subpaths when they are stroked: 0 Butt cap, 1 Round cap, 3 Projecting square cap
void LineDashPattern(const wchar_t* pattern)
d: Control the pattern of dashes and gaps used to stroke paths. It shall be specified by a dash array and a dash phase. The dash array’s elements shall be numbers that specify the lengths of alternating dashes and gaps; the numbers shall be nonnegative and not all zero. The dash phase shall specify the distance into the dash pattern at which to start the dash. pattern = L"[] 0" for no Dash, pattern = L"[3] 0" for three units on, three units off, pattern = L"[1] 2" for 1 on, 2 off, 2 on, 2 off
void LineJoinStyleMiter()
j: Specify the shape to be used at the corners of paths that are stroked
void LineTo(double x, double y)
l: Append a straight line segment from the current point to the point (x, y). The new current point shall be (x, y).
void LineWidth(double lineWidth)
w: Specify the thickness of the line used to stroke a path
void MiterLimit(double value)
M: When two line segments meet at a sharp angle and mitered joins have been specified as the line join style, it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miter limit shall impose a maximum on the ratio of the miter length to the line MitterLimit = MitterLength / LineWidth = 1 / sin(angle/2)
void MoveText(double x, double y)
void MoveTo(double x, double y)
m: Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment
void PageSetup(int paperSize, bool isPortrait)
PDF_PAPER_SIZE_LETTER, PDF_PAPER_SIZE_LEGAL, PDF_PAPER_SIZE_HALF_LETTER, PDF_PAPER_SIZE_JUNIOR_LEGAL, PDF_PAPER_SIZE_LEDGER
void Pie(double centerX, double centerY, double radius, double startAngleDegrees, double endAngleDegrees)
It draws a circular pie
void PolyLine(const POINT* point, const int numPoints)
void Rectangle(const RECT& rect)
void Rectangle(double xLeft, double yTop, double xRight, double yBottom)
void RestoreGraphicsState()
void SaveGraphicsState()
void SetNonStrokeGray(double value)
Set gray level for nonstroking operations
void SetStrokeGray(double value)
Set gray level for stroking operations
void ShowText(const wchar_t* text)
void ShowText(const wstring& text)
void StrokeColor(COLORREF color)
RG: RGB color for stroking operations such as lines and borders
void StrokePath()
You must call StrokePath() after one or more calls to: LineTo, Line, Rectangle, ...
void TextMatrix(double a, double b, double c, double d, double e, double f)
Tm: It sets the Text Matrix (Tm) and the Text Line Matrix (Tl) | a b 0 | Translation: a=1 b=0 c=0 d=1 e=translationX f=translationY | c d 0 | Scaling: a=scaleX b=0 c=0 d=scaleY e=0 f=0 | e f 0 | Rotation: a=cos(angle) b=sin(angle) c=-sin(angle) d=cos(angle) e=0 f=0
void TextMatrixRotation(double angleDegrees, double e, double f)
Tm: It sets the Text Matrix (Tm) and the Text Line Matrix (Tl) | a b 0 | Rotation: a=cos(angle) b=sin(angle) c=-sin(angle) d=cos(angle) e=0 f=0 | c d 0 | | e f 0 |
~ Page()

Reader
Reader()
bool Load(const wchar_t* filename)
void Delete()
~ Reader()

TextGroup
TextGroup()
void Delete()
~ TextGroup()

Token
Pdf::Token& operator =(const Pdf::Token& init)
Token()
Token(const Pdf::Token& init)
bool IsID()
It returns true if the token stores only digits
bool SetText(const char* text)
const wchar_t* GetTypeText()
void Delete()
void GetText(wstring& output)
~ Token()

UrlLink
UrlLink()
void Delete()
~ UrlLink()

Value
Pdf::Value& operator =(const Pdf::Value& init)
Value()
Value(const Pdf::Value& init)
bool GetBoolean(bool & output)
bool GetDouble(double& output)
bool GetInteger(int& output)
bool SetData(const unsigned char* input, size_t input_length)
const wchar_t* GetText()
void Delete()
void GetText(wstring& output)
void SetBoolean(bool value)
void SetDouble(double value)
void SetInteger(int value)
~ Value()

XObject
XObject()
void Delete()
~ XObject()
© Copyright 2000-2021 selo. All Rights Reserved. Jul 22 2021.